<?php require_once ('../common/check.php');  //权限校验 ?>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8"/>
    <title>后台管理系统</title>
    <link href="images/index.css" type="text/css" rel="stylesheet"/>
    <script src="images/jquery.js"></script>
</head>
<body>
<?php require_once 'top.php'?>
<section>
    <?php require_once 'left.php'?>
    <div class="mainbox">
        <div class="note">
            <h4><?=isset($id) ? '修改': '添加'?>文章分类</h4>
            <form action="category.php" method="post">
                <table class="news_form">
                    <tr>
                        <td>分类名字：</td>
                        <td><input type="text" name="name" class="inbox" value=<?=isset($row['name']) ? $row['name'] : ''?> /></td>
                    </tr>
                    <tr>
                        <td>简　　介：</td>
                        <td><textarea name="intro" style="width: 50%" rows="6"><?=isset($row['intro']) ? $row['intro'] : ''?></textarea></td>
                    </tr>
                    <tr>
                        <td>是否显示：</td>
                        <td><input type="checkbox" name="is_show" /></td>
                    </tr>
                    <tr>
                        <td>
                            <input type="hidden" name="id" value=<?=isset($row['id']) ? $row['id'] : ''?> />
                            <input type="hidden" name="action" value=<?=isset($id)?'update':'insert'?> >
                        </td>
                        <td><input type="submit" value="提交"/></td>
                    </tr>
                </table>
            </form>
        </div>
    </div>
</section>
<script>
    $(function(){
        $('dt').click(function(){
            var obj=$(this).next();
            if($(this).next().css('display')=='block'){
                obj.hide('fast');
                $(this).removeClass('on');
            }else{
                obj.show('fast');
                $(this).addClass('on');
            }
        });
    });
</script>
</body>
</html>
